#ifndef KEYBOARD_H_
#define KEYBOARD_H_

#define WRONG_SCANCODE -1
#define MAX_BUFF	30
#define WRONG_CODE -1
#define BUFF_FULL -2

typedef struct {
	unsigned char buffer[MAX_BUFF];
	int first;
	int last;
} bufferT;

unsigned char ctoa (int scancode, int shift, int caps);
int IsLetter(unsigned char c);
int IsNumber(unsigned char c);
unsigned char toUpper(unsigned char c);
int IsLower(unsigned char c);
unsigned char toLower(unsigned char c);
int IsUpper(unsigned char c);
int BufferIsEmpty(bufferT * buff);

int AddToBuffer(unsigned char c, bufferT * buff);

int GetFromBuffer(bufferT * buff);

int CheckBuffer(bufferT * buff);

int GetChar(bufferT * buff);

#endif /*KEYBOARD_H_*/
